added ruby accumulate