Made a new function for prime_check