build the grid