minor changes in grid.js

changes in function createAbstractGrid