refactor getRouteOfMaxDistance with __filterRoutes