updating the grid size