build_tree works