solved pathMatrix refilling problem & added shortest paths output