added test_sum_primes with control flow inside loop