Add support for template