use pattern matching for getting flight information