added support for the custom templates