solve memory issues in accumulator