added sorted_pq