public COP_Instance fixItUp(){
        if (debug>=3) {
                String dmethod = Thread.currentThread().getStackTrace()[2].getMethodName();
                String dclass = Thread.currentThread().getStackTrace()[2].getClassName();
                System.out.println("---------------------------------------");
                System.out.println("[class: "+dclass+" method: " + dmethod+ "] " + "fixit up? " + this.isScrewed());
                System.out.println("---------------------------------------");
        }
        if (this.isScrewed()){
            // step 3-bis: sub the modifier to the function evaluator
            FunctionEvaluator fe = null;
            int[] numArguments;
            NodeArgument[] args;
            for (NodeFunction nf : cop.getNodefunctions()){
                fe = nf.getFunction();
                numArguments = new int[fe.parametersNumber()];
                for (int i = 0; i <= numArguments.length - 1; i++) {
                    // i-th argument of fe
                    numArguments[i] = fe.getParameter(i).size();
                }
                // now run over all the possible values
                int [] v = new int[numArguments.length];
                int imax = v.length-1;
                int i=imax;
                int quanti = 0;
                while(i>=0){
                    while ( v[i] < numArguments[i] - 1 ) {
                        // HERE in v
                        this.updateCost(v, fe, -1);
                        quanti++;
                        v[i]++;
                        for (int j = i+1; j <= imax; j++) {
                            v[j]=0;
                        }
                        i=imax;
                    }
                    i--;
                }
                // HERE in v
                this.updateCost(v, fe, -1);
                quanti++;
            }

        this.screwed = false;
        }
        return this.cop;
    }