find whether there is a route between two nodes