added template controller