working on template rendering