Added extra loop to check every possible alternative by changing the initial node. The best cost is chosen "on the fly" from these.