isPrime solution and test