change the template from function