partition
added summation