added templated class and class method