Loops improved by iterator usage