add accumulate procedure