working and tested indexed min priority queue on binary heap