moved isPrime to a new file