added support for template creation