sum and remainder