change func name to generate_primes