public boolean checkTree(Set<Node> featureList){
        boolean check = true;
        if (feature!= null && !featureList.contains(feature))
            return false;
        if (trueChild != null && trueChild.parent != this)
            return false;
        else if (trueChild != null)
            check &= trueChild.checkTree(featureList);

        if (falseChild != null && falseChild.parent != this)
            return false;
        else if (falseChild != null)
            check &= falseChild.checkTree(featureList);

        return check;
    }