worked on dijkstra MPI, this is the debug version still where validity can b checked