added template resolver to maximize the flexibilty of template mapping