travelling salesman implementation for class