changes to build_tree.py