refactored the autopilot release