dynamic templating added.

example given in testdynamic