distributed tree sum