added support for robot initially facing wrong direction