adjusting for loops