primes generation extracted as package