bag template class with others