made it possible to be used with template variables