renamed segregateSums to seggregateSums