improved performManeuver function