accumulator code samples