made wrapper template return a dynamic template