generalised Summation class