added template rendering