visitor to update values of expanded tree