bubble sort with template class