public boolean isRouteBetweenNodes(GraphNode node1, GraphNode node2){
        if(node1==null || node2 == null){
            return false;
        }
        if(node1==node2){
            return true;
        }
        for(GraphNode node : node1.connectedNodes){
            boolean b = isRouteBetweenNodes(node, node2);
            if(b) return true;
        }
        for(GraphNode node : node2.connectedNodes){
            boolean b = isRouteBetweenNodes(node, node1);
            if(b) return true;
        }
        return false;
    }