Final version of "Dijkstra alghoritm"