allow user-defined templates to be specified