updated prime program for all primes