added utilities to compute TSP