made isPrime way faster