adding into subtree first