start to optimize compare primes