shortest path finish