use local scope in template