added debugging instrumentation to dijkstra