begin shortest path