- added support for templates