add support for compiled templates