nested for loops or bust