improved templating feature