Add a function to push nodes upwards in the tree