public boolean updateQ(NodeVariable x, NodeFunction f, PostService postservice) {
        NodeFunction function = null;
        /*System.out.println("");
        System.out.println("Sono nella updateQ della variabile "+x.getId() +"per la funzione "+f.getId());*/
        LinkedList<MessageR> rmessages = new LinkedList<MessageR>();

        // R from other functions f' to v
        //Iterator<NodeFunction> iterator = this.variableToFunctions.get(v).iterator();
        Iterator<NodeFunction> iterator = x.getNeighbour().iterator();
        // every new iterator value is a new index in M(i)
        while (iterator.hasNext()){
            function = iterator.next();
            if (!(function.equals(f))) {
                //rmessages.add(postservice.readRMessage(f, x));

                if (postservice.readRMessage(function, x) != null) {
                    //System.out.println("La mia variabile ha ricevuto un messaggio da "+function.getId());
                    // if there's a message in (f,x) add it to the list
                    rmessages.add(postservice.readRMessage(function, x));
                }



            }
        }

        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+ "] " + " computeq from "+x+" to "+f);
                System.out.print("rmessages contains: ");
                for (MessageR mr : rmessages){
                    System.out.print(mr + "(from "+mr.getSender()+" to "+mr.getReceiver() +") ");
                }
                System.out.println("");
                System.out.println("---------------------------------------");
        }

        MessageQ messageq = this.computeQ(x, f, this.computeAlpha(x, f, rmessages), rmessages);
        if (messageq == null){
            //System.out.println("Visto che non ho ricevuto messaggi da nessuno anche io restituisco null");
            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+ "] " + "Building up messageR and messageQ");
                    MessageR mr = this.oplus.nullMessage(f, x, x.size());
                    System.out.println("Created messager " + mr + " from "+ mr.getSender()+ " (it should be "+f+") to " +mr.getReceiver()+ " (it should be "+x+")");
                    messageq = mr.toMessageQ();
                    System.out.println("---------------------------------------");
            }
            
            //messageq = this.oplus.nullMessage(f, x, x.size()).toMessageQ();
            messageq = this.otimes.nullMessage(x, function, x.size());
            //System.out.println("Ho creato un nullMessage che è formato da tanti 0.0 quanti sono i valori del dominio");
        }
        
        return postservice.sendQMessage(x, f, messageq);
    }