switched to template-based generator