Updated TSP calculation