             containedAttributedText.append(emptySpace)
         }
         
-        let choosenSuggestion = createAttributed(string: completionTextHolderText, with: .blue)
-        containedAttributedText.append(choosenSuggestion)
+        let chosenSuggestion = createAttributed(string: completionTextHolderText, with: .blue)
+        containedAttributedText.append(chosenSuggestion)
         userTextField.attributedText = containedAttributedText
+        
+        chosenTags.append(completionTextHolderText)
     }
     
     private func createAttributed(string: String, with color: UIColor) -> NSMutableAttributedString {

    private var userTextField: UITextField!
    
    private var collection = [String]()
    private var tagCharacter = String()
    private var containedAttributedText = NSMutableAttributedString()
    

        else { return }
        
        let trimmedLastWord = lastWord.trimmingCharacters(in: .whitespaces)
        for index in 0...collection.count-1 {
            if tagCharacter + collection[index] == trimmedLastWord || chosenTags.contains(trimmedLastWord) {
                updateContainedAttributedText()
                containedAttributedText.replaceCharacters(in: NSMakeRange(containedAttributedText.string.characters.count - trimmedLastWord.characters.count,
                                                                          trimmedLastWord.characters.count), with: "")
                userTextField.attributedText = containedAttributedText
                
                guard let index = chosenTags.index(of: trimmedLastWord) else { return }
                chosenTags.remove(at: index)
                break;
            }
        }
        translateCompletionTextHolderDown(with: nil)
