Better guardedGenerate