committing changes: replaced array with vector and replaced class with template class