computes the sum