finished sorted_priority_queue