Flights: The buying part is put in a function to avoid repetition