added testGenerate