修改了TreeFunctions