testPriorityQueue method added