robot class updated to pass the tests