work in template controller