put tree code in own subtree