fix my stupoid bugggg captured perpeptual loop in buildSpanningTree and
getSHortestPath