public static void prepareNodes() {
        try {
            CoordinatorGUI.textArea.append("Transmitting ready checks to nodes..." + "\n" + "\n");
            String ready = "ready?";

            buf = ready.getBytes();
            packet = new DatagramPacket(buf, buf.length, group, 4446);
            socket.send(packet);
            CoordinatorGUI.textArea.append("Ready checks sent to nodes..." + "\n" + "\n");
            getResponses();
            if (hasResponse) {
                CoordinatorGUI.textArea.append("Responses from nodes regarding ready state: " + "\n" + "\n");
                for (int j = 0; j < nodes; j++) {
                    CoordinatorGUI.textArea.append(" " + responses.get(j) + "\n" + "\n");
                    if (responses.get(j).equals("no")) {
                        nodesReady = false;
                    }
                }
                if (nodesReady) {
                    commit = true;
                    String taskToSend = "task ";
                    task = br.readLine();
                    taskToSend += task;
                    buf = taskToSend.getBytes();
                    packet = new DatagramPacket(buf, buf.length, group, 4446);
                    socket.send(packet);
                } else {
                    commit = false;
                    abort();
                }
            }
        } catch (IOException ex) {
            System.err.println(ex);
        }
    }