added method to draw the grid