refactored optional primes number