adding the beginnings of dijkstra's algorithm