refactored NextStep method