Solution for routes with distance added