Updated java tsp with threads