finished sum of primes exercise