less self generation tests, better mimic the node api, and check the primes