         if (corner.count != 4){
             assertionFailure({ () -> String in
                 "Wrong argument, must be 4 but \(corner.count) input"
-            }())
+                }())
         }
         let img = UIImage(named: self)!
         return img.resizableImageWithCapInsets(UIEdgeInsetsMake(CGFloat(corner[0]), CGFloat(corner[1]), CGFloat(corner[2]), CGFloat(corner[3])))

extension NSData{

    /// get json dictionary wrapped by accessor object
    func adToJsonObject()->ADAccessor{
        return ADAccessor(NSJSONSerialization.JSONObjectWithData(self, options: NSJSONReadingOptions.AllowFragments, error: nil)!)
    }

    /// to utf8 string
    func adToUtf8String()->String{
        return "\(NSString(data: self, encoding: NSUTF8StringEncoding))"
    }

    /// to url safe base64 string

        let path = filename.adFileInFolderString(catalog)
        return NSData(contentsOfFile: path, options: NSDataReadingOptions.UncachedRead, error: nil)!
    }
    
}
