added docstring to prime_gen