make 12 slightly faster by using a list of primes