added a way to set the size of grids