# Instruction.next\_instruction()

`next_instruction() →` [`APISet`](https://glide.gitbook.io/main/glider-ide/api/iterables/apiset)`[`[`Instruction`](https://glide.gitbook.io/main/glider-ide/api/instruction)`]`

The difference between the next\_instruction() function and [next\_instructions()](https://glide.gitbook.io/main/glider-ide/api/instruction/instruction.next_instructions) is that this function will return a list of instructions that are immediately following the current instruction in the CFG (control-flow-graph).

*The function operates non-recursively, meaning it works intra-procedurally.*

For example, in the function:

```solidity
function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }
```

for the instruction:&#x20;

```solidity
uint256 c = a + b;
```

the function will return the instruction:

```solidity
require(c >= a, "SafeMath: addition overflow");
```

## Query Example

```python
from glider import *
def query():
  instructions = Functions().with_name("sub").exec(1,1).instructions().exec(1,1)

  return instructions + instructions[0].next_instruction()
```

## Example Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FyiUQa7V5OAtykFttwrBO%2Fimage.png?alt=media&#x26;token=4b569aa5-a0d9-43b1-aa03-ce02d47aeffc" alt=""><figcaption></figcaption></figure>
