priority queue using linked list