SUCCESSFULLY WORKING CODE FOR ROBOT.