#1 - Changing implementation to priorityQueue based