makeTreeAndReturnLeaf()の引数にphaseを追加