added optimization to closed tour
removed print statements