oh gods the nested for loops