added optimisation that will disregard any path containing more than one node to visit, and at least one node of degree 0