Use merge to do summation