begging the reformations of template functions