Maybe make value of stageIdToAccumulators a Map ?