added build_tree function