Added addFlightFunction