public boolean[] declassifyToBoth2(T[] x) {
		

		if(env.getMode() == Mode.COUNT){
			return new boolean[x.length];
		}
		
		boolean[] pos = env.outputToBob(x);	

		if (env.getParty() == Party.Bob) {
			byte[] tmp = new byte[pos.length];
			for (int i = 0; i < pos.length; ++i)
				tmp[i] = (byte) (pos[i] ? 1 : 0);
			env.channel.writeByte(tmp, tmp.length);
			env.flush();
		} else {
			byte tmp[] = env.channel.readBytes(x.length);
			pos = new boolean[x.length];
			for (int k = 0; k < tmp.length; ++k) {
				pos[k] = ((tmp[k] - 1) == 0);
			}
		}
		return pos;
	}