private void registerSlave() {
		// Compose and transmit a hi message
		Message msg = new Message("hi", toHost, toPort);
		try {
			Message ret = commModule.send(msg);
			if (ret != null && ret.getContent() != null) {
				// get its id from the master
				slaveID = Integer.parseInt(ret.getContent());
				System.out.println("Slave #" + slaveID
						+ ": connected to master at " + toHost);
			} else {
				System.out.println("Master isn't there");
			}
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}