adding dijkstra's heap optimization