allowing testCumSumG to run cumsumg multiple times