ofRange refactoring