simplified for loops