implement loading function from TSP file