Thanks for the help. Can you expand on what you mean? The function called on line 35 (heuristicNodeCheck) will compare the heuristic to the new total created every time a node is checked or listed as a neighbour. Therefore the heuristic will always be kept relevant. Are you suggesting that when a node is labelled with a heuristic to keep it as its first value?