correct primes.py; use a function