Use proper loops.