modify primes generator