Added pre dijkstra stuff, check if it will work
idk