added a FIXME remark about impure function generate_template()