finctions to run the robot