fixed templater implementaion