             return JSONDecoder(createError("key: \(key) does not exist or this is not a Dictionary type"))
         }
     }
+    ///private method to create an error
     func createError(text: String) -> NSError {
         return NSError(domain: "JSONJoy", code: 1002, userInfo: [NSLocalizedDescriptionKey: text]);
     }
     
-    ///print the decoder in a pretty format. Helpful for debugging.
+    ///print the decoder in a JSON format. Helpful for debugging.
     public func print() -> String {
         if let arr = self.array {
             var str = "["
             for decoder in arr {
                 str += decoder.print() + ","
             }
-            str.removeAtIndex(str.endIndex)
+            str.removeAtIndex(advance(str.endIndex, -1))
             return str + "]"
         } else if let dict = self.dictionary {
             var str = "{"

            }
        }
    }
    //the init that converts everything to something nice
    public init(_ raw: AnyObject) {
        var rawObject: AnyObject = raw
        if let data = rawObject as? NSData {

    }
}

///Implement this protocol on all objects you want to use JSONJoy with
public protocol JSONJoy {
    init(_ decoder: JSONDecoder)
}
