more use of name provider in templates