First Part of RouteCalculation