             }
             
             if obj is Bool {
-                if obj as Bool {
+                if obj as! Bool {
                     return "1"
                 } else {
                     return "0"

        //create the database path
        class func createPath() -> String {
            
            let docsPath = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)[0] as String
            let databaseStr = "SwiftData.sqlite"
            let dbPath = docsPath.stringByAppendingPathComponent(databaseStr)
            

    */
    public static func deleteUIImageWithID(id: String) -> Bool {
        
        let docsPath = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)[0] as! String
        let imageDirPath = docsPath.stringByAppendingPathComponent("SwiftDataImages")
        let fullPath = imageDirPath.stringByAppendingPathComponent(id)
        
