convert to a template