added the 'move' and 'wall' function