add query using shortestpath which seems way quicker