Added new isPrime() function; replaced call to non-existant function.