sum and diff