update tree