update for tree