     ///   - data:  [UInt8] bluetooth packet
     ///
     init(data: [UInt8]) {
-        if let status = statusFrom(rawByte: data[0]){
-            //is regular midi status
-            let channel = channelFrom(rawByte: data[0])
-            fillData(status: status, channel: UInt8(channel), byte1: data[1], byte2: data[2])
-        }else if let command = AKMIDISystemCommand(rawValue: data[0]){
+        if let command = AKMIDISystemCommand(rawValue: data[0]){
+            internalData = []
             //is sys command
             if command == .sysex{
                 for byte in data{
                     internalData.append(byte)
                 }
+                length = UInt8(internalData.count)
             }else{
                 fillData(command: command, byte1: data[1], byte2: data[2])
             }
+        }else if let status = statusFrom(rawByte: data[0]){
+            //is regular midi status
+            let channel = channelFrom(rawByte: data[0])
+            fillData(status: status, channel: UInt8(channel), byte1: data[1], byte2: data[2])
         }
     }
     

        //2nd byte fine timestamp will always be > 128 - if 2nd message < 128, is continuing sysex
        //3nd < 128 running message - timestamp
        //status byte determines length of message
        var midiEvents:[AKMIDIEvent] = []
        if bluetoothData.count > 1 {
            var rawEvents: [[UInt8]] = []

        return 0
    }
    
    public var data1: UInt8 {
        return internalData[1]
    }
    
    public var data2: UInt8 {
        return internalData[2]
    }
    
