update trees