flesh out the node difference function