Adding support for complex routing