added template for priority queue