                 })
                 
                 let reducedData = self.data.reduce([], +)
-                print(reducedData)
                 self.extractData(rawData: reducedData, field: field)
 
             }
         }
     }
     
-    public func queryData(field: String = "dust", sortingFeature: String = "datetime_idx", orderType: String = "asc", startTimestamp: String = "1491004800000", endTimestamp: String = "1499177600000", callback: @escaping (Int, Int, Int, [Int], [Int]) -> Void) {
+    static public func queryData(field: String = "dust", sortingFeature: String = "datetime_idx", orderType: String = "asc", startTimestamp: String = "1491004800000", endTimestamp: String = "1499177600000", callback: @escaping (Int, Int, Int, [Int], [Int]) -> Void) {
         self.callback = callback
         let body = buildBody(field: field, sortingFeature: sortingFeature, orderType: orderType, startTimestamp: startTimestamp, endTimestamp: endTimestamp)
         getDataSize(body: body, field: field, completion: makeAssynchronousRequest)
     }
     
-    public func setURL(url : String) -> Void {
+    static public func setURL(url : String) -> Void {
         self.urlString = url
     }
 }

    }

    
    private func dictToJSON(data: [String : Any]) -> Data {
        let bodyJSON =   try! JSONSerialization.data(withJSONObject: data, options: JSONSerialization.WritingOptions.prettyPrinted)
        
        let json = NSString(data: bodyJSON, encoding: String.Encoding.utf8.rawValue)
        if let json = json {
            print(json)
        }
        
        let jsonData = json!.data(using: String.Encoding.utf8.rawValue);
        
        return jsonData!
    }
    
    private func extractData(rawData: [ElasticSearchData], field: String) {
        var average = 0
        var maximum = Int.min
        var minimum = Int.max

    }
    
    
    static private func getDataSize(body: [String  : Any], field: String, completion:@escaping ([String : Any], String, Int) -> Void) {
        var modifiedBody = body
        modifiedBody["size"] = 0
        let jsonBody = dictToJSON(data: modifiedBody)
