making the prime generator more generic so it can be consumed from multiple calling methods.