refactored next iter