Implement priority_queue