Adding dynamic template