use an atom to simplify the accumulator.