complete shortest path