public int argOfInterestOfZ(MessageContent z) {
        // we look for the argmin
        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+ "] " + "computing the Z index of"+z);
                System.out.println("---------------------------------------");
        }
        int argmin = 0;
        double minvalue = z.getValue(0);
        for (int index= 0; index < z.size()-1; index++) {

            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+ "] " + "loop number "+index+" minvalue="+minvalue);
                    System.out.println("---------------------------------------");
            }


            if (minvalue > z.getValue(index+1)) {
                argmin = index+1;
                minvalue = z.getValue(index+1);
            }
        }

        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+ "] " + "the argmin is "+argmin);
                System.out.println("---------------------------------------");
        }

        return argmin;
    }