working on priorityqueue