Update tree_templ.cpp