output is now sorted by route