update the grid system