dijkstra seems to be working as bfs with 0 weights