fixing the grid calling