Adding path distance