refactored the flightplan creation method