created method to generate grid of cells