minor changes to add_subtree