update the treeHeight