Adding a method to calculate all the short paths of a network