Got max priority queue working