update tree data structure and TreeUtils