add some new function into Tree.cpp