public synchronized void finishEntropyProcessing(int num_msgs, int otherID, Socket sock) {
		//		Write nextWrite;
		//		Write committedWrite;

		entropy_size = num_msgs;

		while(entropy_writes.size() != entropy_size) {
			try {
				wait();
			}
			catch(InterruptedException e) {}
		}

		for(int i = 1; i<=num_msgs; i++) {
			Write nextWrite = entropy_writes.get(i);

			if(nextWrite.isCommitted()) {
				if(!(nextWrite.getUpdateCmd()).equals(Constants.commit_existing)) {
					committedWrites.log(nextWrite);
				}
				else {

					System.out.println("W: " + nextWrite);
					//committedWrite = committedWrites.removeWrite(nextWrite.getAcceptStamp(), nextWrite.getServerId());
					Write committedWrite = uncommittedWrites.removeWrite(nextWrite.getAcceptStamp(), nextWrite.getServerId());
					committedWrite.setAcceptStamp(nextWrite.getAcceptStamp());
					committedWrite.setCSN(nextWrite.getCSN());
					committedWrite.setSID(nextWrite.getServerId());
					committedWrite.setCommitted(true);

					committedWrites.log(committedWrite);
				}

				largestCSN = Math.max(nextWrite.getCSN(), largestCSN);
			}
			else {
				if(isPrimary) {
					largestCSN = Math.max(System.currentTimeMillis(), largestCSN+1);
					nextWrite.setCommitted(true);
					nextWrite.setCSN(largestCSN);

					committedWrites.log(nextWrite);
				}
				else {
					uncommittedWrites.log(nextWrite);
				}
			}

			if(!retired_list.containsEntry(nextWrite.getServerId())) {
				if(versionVector.containsEntry(nextWrite.getServerId()))
					versionVector.changeifMax(nextWrite.getServerId(), nextWrite.getAcceptStamp());
				else
					versionVector.addEntry(nextWrite.getServerId(), nextWrite.getAcceptStamp());
			}
		}

		entropy_writes.clear();
		entropy_size = Integer.MAX_VALUE;
		setFreeForEntropy(true);
		rePopulatePlaylist();

		sendUpdatesReceivedAck(sock);
	}