can compute sum in the middle of the tree