Adding function isPrime