fix for isPrime code
used loop.break