# It is not correct.

<run start>

"hello"
"a"
"b"
"c"

<run complete>
```
</CodeGroup>

Any non-deterministic logic (like database calls or API calls) must be placed inside a `step.run` call to ensure it is executed correctly within each step.

With this in mind, here is how the previous example can be fixed:

```python
import inngest
from src.inngest.client import inngest_client

@inngest_client.create_function(
    id="simple-function",
    trigger=inngest.TriggerEvent(event="test/simple.function")
)
async def simple_function(ctx: inngest.Context):
    await ctx.step.run("hello", lambda: print("hello"))

    await ctx.step.run("a", lambda: print("a"))
    await ctx.step.run("b", lambda: print("b")) 
    await ctx.step.run("c", lambda: print("c"))