         
         var url = CloudApp.getApiUrl() + "/data/" + CloudApp.getAppId()!
         url = url + "/" + tableName! + "/find"
-        CloudCommunications._request("POST", url: NSURL(string: url)!, params: params, callback: {
-            (response: CloudBoostResponse) in
-            callbak(response: response)
+        
+        CloudCommunications._request("POST",
+                                     url: NSURL(string: url)!,
+                                     params: params, callback: { response in
+                                        
+                                        if response.status == 200 {
+                                            
+                                            if let documents = response.object as? [NSMutableDictionary] {
+                                                
+                                                var objectsArray = [CloudObject]()
+                                                
+                                                for document in documents {
+                                                    
+                                                    let object = self.objectClass.cloudObjectFromDocumentDictionary(document, documentType: self.objectClass)
+                                                    
+                                                    objectsArray.append(object)
+                                                }
+                                                
+                                                let theResponse = CloudBoostResponse()
+                                                theResponse.success = response.success
+                                                theResponse.object = objectsArray
+                                                theResponse.status = response.status
+                                                
+                                                callback(response: response)
+                                            } else if let document = response.object as? NSMutableDictionary {
+                                                
+                                                let object = self.objectClass.cloudObjectFromDocumentDictionary(document, documentType: self.objectClass)
+                                                
+                                                let theResponse = CloudBoostResponse()
+                                                theResponse.success = response.success
+                                                theResponse.object = object
+                                                theResponse.status = response.status
+                                                
+                                                callback(response: response)
+                                            } else {
+                                                
+                                                callback(response: response)
+                                            }
+                                        } else {
+                                            
+                                            callback(response: response)
+                                        }
         })
     }
 
-    public func distinct(key: String, callbak: (response: CloudBoostResponse) -> Void ){
+    public func distinct(key: String, callback: (response: CloudBoostResponse) -> Void ){
         
         var _key = key
         if(key == "id") {

        
        var url = CloudApp.getApiUrl() + "/data/" + CloudApp.getAppId()!
        url = url + "/" + tableName! + "/findOne"
        CloudCommunications._request("POST", url: NSURL(string: url)!, params: params, callback: {
            (response: CloudBoostResponse) in
            callbak(response: response)
        })
        
    }
    
    public func findById(id: String, callbak: (response: CloudBoostResponse) -> Void ){
        try! self.equalTo("id", obj: id)
        let params = NSMutableDictionary()
        params["query"] = query
        params["select"] = select

        
        var url = CloudApp.getApiUrl() + "/data/" + CloudApp.getAppId()!
        url = url + "/" + tableName! + "/distinct"
        
        CloudCommunications._request("POST",
                                     url: NSURL(string: url)!,
                                     params: params, callback: { response in
                                        
                                        if response.status == 200 {
                                            
                                            if let documents = response.object as? [NSMutableDictionary] {
                                                
                                                var objectsArray = [CloudObject]()
                                                
                                                for document in documents {
                                                    
                                                    let object = self.objectClass.cloudObjectFromDocumentDictionary(document, documentType: self.objectClass)
                                                    
                                                    objectsArray.append(object)
                                                }
                                                
                                                let theResponse = CloudBoostResponse()
                                                theResponse.success = response.success
                                                theResponse.object = objectsArray
                                                theResponse.status = response.status
                                                
                                                callback(response: response)
                                            } else if let document = response.object as? NSMutableDictionary {
                                                
                                                let object = self.objectClass.cloudObjectFromDocumentDictionary(document, documentType: self.objectClass)
                                                
                                                let theResponse = CloudBoostResponse()
                                                theResponse.success = response.success
                                                theResponse.object = object
                                                theResponse.status = response.status
                                                
                                                callback(response: response)
                                            } else {
                                                
                                                callback(response: response)
                                            }
                                        } else {
                                            
                                            callback(response: response)
                                        }
        })
    }
    
