Add function move the robot. Change y variable into f