tree update node refactoring