Update grid.c