modify to support generating hamlc templates