void handleLeaderDisconnection() {
    String [] disMessagePieces= backupAccumulatorString.split(DELIM, 3);

    //wait until new backupString is updated since it might take time
    while (disMessagePieces.length < 2)
      disMessagePieces= backupAccumulatorString.split(DELIM, 3);
    currentLeaderInfo = disMessagePieces[1];
    String[] nextLeader = currentLeaderInfo.split(DELIM2);
    if (disMessagePieces.length == 3)
      backupAccumulatorString = "b " + disMessagePieces[2];
    else if (disMessagePieces.length == 2)
      backupAccumulatorString = "b";
    Boolean resolved = false;
    while (!resolved) {
      try {
        if (isMyIpPort(nextLeader[0], nextLeader[1])) {
          System.out.println("I'm the leader!");
          isLeader = true;
          String [] slistMessagePieces = backupAccumulatorString.split(DELIM);
          accumulatorList.clear();
          for (int i = 1; i != slistMessagePieces.length; ++i) {
            accumulatorList.add(slistMessagePieces[i]);
          }
          resolved = true;
        } else {
          connectToLeader(nextLeader[0], nextLeader[1]);
          resolved = true;
        }
      } catch (UnknownHostException e) {
        System.err.println("Resolution bug!");
      }
    }
    //connect to master only if is leader
    if (isLeader) {
      connectToMaster();
    }
  }