expand template engine