updating subtree