resetting subtrees