to_tree