restructured moveUp, moveDown, moveLeft, moveRight to make it cleaner