templating improvement