add support for template