Update grid.R