Update grid.cc