Added isPrime function -DV