Moving sequence sum to general algorithms for testing.