adding primes impl