changed isPrime to account for being passed integers below 1.