public byte[] fextractOutPayload (Circuit c, int total_size, boolean alice_inputs) {
        int i, j, j1, k = 0, line_num ;
        byte[] small_byte_arr;
        byte[] big_byte_arr = new byte[total_size];

        for (i = 0; i < FMT.size(); i++) {
            IO io = FMT.elementAt(i);

            // Verify it's a relevant i/o object
            if (io.isInput()) continue;
            if (io.isAlice() != alice_inputs) continue;

            // Scan all specified input bits, one by one,
            // Extract payload data from relevant gates,
            // and store them in the result array
            for (j = 0; j < io.getNLines(); j++) {
                // This bit belongs to output of j'th line_num
                line_num = io.getLinenum(j);
                Gate g = c.getGate(line_num);
                small_byte_arr = g.gextractOutPayload();
                for (j1 = 0; j1 < small_byte_arr.length ; j1++, k++)
                   big_byte_arr[k] = small_byte_arr[j1];
            }
        }

        return (big_byte_arr);
    }