update cell and grid