moved main AI code so Rawan can run the robot