Refactor "for"