working on shared and unshared primes functions