completed AccumFactory.cs