altered min-heap to comply to dijkstra's algorithm