rebuild subtree