loops, not duplicate code