improved dynamic templating
add example of dynamic templating
fix minor typo