further condensed code for templating items