implementation of priority queue