findSSShortestPath and avg function implemented