new function to add a flight