Updating the accumulation function.