Now that you've refactored this out of `run_once`, you don't need to redefine i