added template controller for further use