updated grid.js