priority queue finished