                     let serialisedData = try NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.MutableContainers)
                     if let jsonObjectReult = serialisedData as? NSMutableDictionary {
                         cloudBoostResponse.object = jsonObjectReult
-                        callback(response: cloudBoostResponse)
+                        queue?.addOperationWithBlock {
+                            callback(response: cloudBoostResponse)
+                        }
                     }else if let  jsonArrayResult = serialisedData as? [NSDictionary] {
                         cloudBoostResponse.object = jsonArrayResult
-                        callback(response: cloudBoostResponse)
+                        queue?.addOperationWithBlock {
+                            callback(response: cloudBoostResponse)
+                        }
                     }else{
                         if let intVal = Int((NSString(data: data!, encoding: NSUTF8StringEncoding) as? String)!)  {
                             cloudBoostResponse.object = intVal

    public func URLSession(session: NSURLSession, task: NSURLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
        print("did send")
        response.progress = Double(totalBytesSent)/Double(totalBytesExpectedToSend)
        progressCallback!(progressCallback: response)
    }
    
    public func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveResponse response: NSURLResponse, completionHandler: (NSURLSessionResponseDisposition) -> Void) {

        } catch {
            response.message = "Error in parsing resceived response"
        }
        self.progressQueue?.addOperationWithBlock {
            self.progressCallback!(progressCallback: self.response)
        }
    }


