renamed testgenerating function