tweak the generation of the template