woah one too many for loops