Added (generate-primes) helper function