added needed functions to the priorityQueue, not tested yet.