fix tree method