functions stuff and comparison of primes generators