     data[dataArrayIndex] = (data[dataArrayIndex] << 1) | isOne;
 }
 
+//reverse last 4 bits and return
+//so 0101 -> 1010, 1100 -> 0011
+byte getLastFourBitsReversed(int b) {
+    byte inverted = 0;
+
+    inverted = inverted | ((b & 1) << 3); //(byte & 0001) << 3 so could be 1000
+    inverted = inverted | (b & 2) << 1; //(byte & 0010) << 1 so could be 0100
+    inverted = inverted | (b & 4) >> 1; // (byte & 0100) >> 1 so could be 0010
+    inverted = inverted | (b & 8) >> 3; // (byte & 1000) >> 3 so could be 0001
+
+    return inverted;
+}
+
 // Matcher for divider bit
 boolean matchDivider(int value) {
     return match(value, DIVIDER_PULSE_LENGTH, DIVIDER_THRESHOLD);

}

void printDataArray() {
    for (byte i = 0; i < DATA_ARRAY_SIZE; i++) {
        printByteAsBitSet(data[i]);
        Serial.print("|");
    }
    Serial.println();
}

void printByteAsBitSet(byte b) {
    if (b & 8) {
        Serial.print("1");
    } else {
        Serial.print("0");
    }

    if (b & 4) {
        Serial.print("1");
    } else {
        Serial.print("0");
    }

    if (b & 2) {
        Serial.print("1");
    } else {
        Serial.print("0");
    }

    if (b & 1) {
        Serial.print("1");
    } else {
        Serial.print("0");
    }
}

void fillDataArray(byte bitNumber, boolean isOne) {

            fillDataArray(bitNumber, matchOne);

            if (bitNumber == DATA_BITS_AMOUNT - 1) {

                //This was the last value bit
                //All is done we can return the whole message to the client!
                printDataArray();
