adding a prime generator, even though it is slower than I would like