         if (nextWord == "") {
             return
         }
-//        if (nextWord != "") {
-            let index = nextWord.index(nextWord.startIndex, offsetBy: curWord.characters.count + 1)
-            (textDocumentProxy as UIKeyInput).insertText(nextWord.substring(from: index))
-            //curWord = ""
-            //nextWord = ""
-            //dictStart = 0
-//        }
+        let index = nextWord.index(nextWord.startIndex, offsetBy: curWord.characters.count + 1)
+        (textDocumentProxy as UIKeyInput).insertText(nextWord.substring(from: index))
         (textDocumentProxy as UIKeyInput).insertText(" ")
         curWord = ""
         nextWord = ""

        
        let doubleTap = UITapGestureRecognizer(target: self, action: #selector(enterAutoCompleteWord))
        doubleTap.numberOfTapsRequired = 2
        
//        tap.require(toFail: doubleTap)

        
        view.addGestureRecognizer(swipeDown)
        view.addGestureRecognizer(swipeUp)

        swipeUp.direction = UISwipeGestureRecognizerDirection.up
        
        let swipeLeft = UISwipeGestureRecognizer(target: self, action: #selector(enterDelete))
        swipeLeft.direction = UISwipeGestureRecognizerDirection.left
        
        let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(enterSpace))
        swipeRight.direction = UISwipeGestureRecognizerDirection.right
        
        let tap = UITapGestureRecognizer(target: self, action: #selector(insertSelectedCharacter (_:)))
