grid.cc updated for boundry, moveLeft & moveRight updated with helper