Loop was refactored