queue template class and test codes added