finished second rework of dijkstra's