also sorting the routes return object (MUST DO REFACTORING)