potential dijkstra coded