accumulator function tested.