fixed tsp sorting