simplify priorityqueue