Creating grid and changing grid size