added the moving functionality for the robot