dijkstra tested and implemented