Improve for loops