working on the priorityQueue