first version of processTopHatCounts