Renamed J to potentialPrime and JPRIME to isPrime