first version of prime generator