priority queue implemented on binary heap