added table sorting for routes"