add tree method