added primes calculation