tsp function
tsp main