computing a sum is for getting a total