use extension function to sort routes