add a new accumulator function.