add support for retrieving template