private List<ParseMessage> getResponseToStateReq() throws Exception {
        List<String> messages = new ArrayList<String>();
        List<ParseMessage> pmTemp = new ArrayList<ParseMessage>();
        long startTime = (System.currentTimeMillis()+timeout);
        long timer = timeout/10;
        boolean timeout_flag = false;


        while(System.currentTimeMillis() < startTime) {

            //Thread.sleep(timer);
            messages = controller.getReceivedMsgs();
            for(String m:messages) {
                ParseMessage nextreceivedPM = new ParseMessage(m);

                if(nextreceivedPM.getMessageHeader().equalsIgnoreCase(ParticipantSTATE.ABORTED.toString()) ||
                    nextreceivedPM.getMessageHeader().equalsIgnoreCase(ParticipantSTATE.COMMITTED.toString()) ||
                    nextreceivedPM.getMessageHeader().equalsIgnoreCase(ParticipantSTATE.COMMITTABLE.toString()) ||
                    nextreceivedPM.getMessageHeader().equalsIgnoreCase(ParticipantSTATE.UNCERTAIN.toString()))
                {
                    pmTemp.add(nextreceivedPM);
                    timeout_flag = true;
                }

                logger.log(Level.INFO, "<<<" + config.procNum + ">>> Response to state request from [" + nextreceivedPM.getSource() + "] with " + nextreceivedPM.getMessageHeader());
            }

            if(pmTemp.size() == upSet.size()-1) {
                timeout_flag = true;
                break;
            }
        }
        if(!timeout_flag){
            logger.log(Level.INFO , "<<<" + config.procNum + ">>> New Coordinator timed out. Recvd " + pmTemp.size() + " responses." );
            updateUpset(pmTemp);
        }
        return pmTemp;
    }