shortestPath: better variable names