makes the grid classes into a for loop