public boolean[] declassifyToBoth(T[] x) {
		if(env.getMode() == Mode.COUNT){
			return new boolean[x.length];
		}
		else if (env.getMode() == Mode.VERIFY) {
			return util.Utils.tobooleanArray((Boolean[]) x);
		}else {

			GCSignal[] in = (GCSignal[])x;

			boolean[] pos = new boolean[x.length];
			GCSignal tmp;
			for(int i = 0; i < x.length; ++i) {
				if(in[i].isPublic()) {
					pos[i] = in[i].v;
				}
				else {
					in[i].send(env.channel);
				}
			}
			env.channel.flush();
			for(int i = 0; i < x.length; ++i) {
				if(!in[i].isPublic()) {
					tmp = GCSignal.receive(env.channel);
					if(tmp.equals(in[i]))
						 pos[i] = false;
					else
						pos[i] = true;
				}
			}
			return pos;
		}
	}