added support for template variants