public String getReplicaAddress() {

		if (slaveAddresses.isEmpty()) {
			return masterAddress;
		} else {
			// randomly give a slaveAdress back
			int size = slaveAddresses.size();
			int item = new Random().nextInt(size);
			int i = 0;
			for (String obj : slaveAddresses) {
				if (i == item) {
					return obj;
				} else {
					i = i + 1;

				}
			}
		}
		
		return masterAddress;
	}