test function for accumulator