template variables and directives working