         }
     }
     
-    func getEvent() -> String {
-        return data[0] as! String
-    }
-    
-    func getArgs() -> [AnyObject]? {
-        var arr = data
-        
-        if data.count == 0 {
-            return nil
-        } else {
-            arr.removeAtIndex(0)
-            return arr
-        }
-    }
-    
+    static func packetFromEmitWithData(data:[AnyObject], id:Int, nsp:String) -> SocketPacket {
+        let (parsedData, binary) = deconstructData(data)
+        let packet = SocketPacket(type: findType(binary.count, ack: false), data: parsedData,
+            id: id, nsp: nsp, placeholders: -1, binary: binary)
+        
+        return packet
+    }
+    
+    static func packetFromEmitAckWithData(data:[AnyObject], id:Int, nsp:String) -> SocketPacket {
+        let (parsedData, binary) = deconstructData(data)
+        let packet = SocketPacket(type: findType(binary.count, ack: true), data: parsedData,
+            id: id, nsp: nsp, placeholders: -1, binary: binary)
+        
+        return packet
+    }
+}
+
+extension SocketPacket {
     private static func shred(data:AnyObject, inout binary:[NSData]) -> AnyObject {
         if let bin = data as? NSData {
             let placeholder = ["_placeholder" :true, "num": binary.count]

    }
    
    func createAck() -> String {
        var msg:String
        
        if type == PacketType.ACK {
            if nsp == "/" {

        }
    }
    
    func getEvent() -> String {
        return data[0] as! String
    }
    
    func getArgs() -> [AnyObject]? {
        var arr = data
        
        if data.count == 0 {
            return nil
        } else {
            arr.removeAtIndex(0)
            return arr
        }
    }
}

extension SocketPacket {
    private static func findType(binCount:Int, ack:Bool) -> PacketType {
        switch binCount {
        case 0 where !ack:
