made template function follow style