Adding method for getting tree hie