         contentLanguage: String? = nil,
         acceptLanguage: String? = nil,
         headers: [String: String]? = nil,
-        failure: ((Error) -> Void)? = nil,
-        success: @escaping (ToneAnalysis) -> Void)
+        completionHandler: @escaping (WatsonResponse<ToneAnalysis>?, Error?) -> Void)
     {
         // construct body
         guard let body = toneContent.content else {
-            failure?(RestError.serializationError)
+            completionHandler(nil, RestError.serializationError)
             return
         }
 

       are treated as their parent language; for example, `en-US` is interpreted as `en`. You can use different
       languages for **Content-Language** and **Accept-Language**.
     - parameter headers: A dictionary of request headers to be sent with this request.
     - parameter failure: A function executed if an error occurs.
     - parameter success: A function executed with the successful result.
     */
    public func toneChat(
        utterances: [Utterance],
        contentLanguage: String? = nil,
        acceptLanguage: String? = nil,
        headers: [String: String]? = nil,
        failure: ((Error) -> Void)? = nil,
        success: @escaping (UtteranceAnalyses) -> Void)
    {
        // construct body
        let toneChatRequest = ToneChatInput(utterances: utterances)
        guard let body = try? JSONEncoder().encode(toneChatRequest) else {
            failure?(RestError.serializationError)
            return
        }


        do {
            let json = try JSONDecoder().decode([String: JSON].self, from: data)
            var userInfo: [String: Any] = [:]
            return NSError(domain: domain, code: code, userInfo: userInfo)
        } catch {
            return NSError(domain: domain, code: code, userInfo: nil)
