Implement range loop