template class - modified class function