added shortest path function