you should avoid nested for loops at all costs. Use arrays to your advantage.