simpler partition code

I can use Acc.accum in there