added flights logic