added getRouteLength helper method