updating directives and templates