adding support for flights with 2 legs