tsp solver in a loop