refactored range step into step