reduce template function calls