Revert "Refactoring" Cannot use method sum here.

This reverts commit 8f5be4af2443b52141b48a0f2d9f398078b88601.