move template name into own method