renamed sum to fold