added get_tree method