init implementation of Dijkstra algorithm