shortest path query for directed path