         }
         
         // only return first word if in word mode
-        if(self.autocompleteType == .Word)
-        {
+        if self.autocompleteType == .Word {
             let words = self.text!.componentsSeparatedByString(" ")
             let suggestionWords = text.componentsSeparatedByString(" ")
             var string : String = ""
-            for(var i = 0; i < words.count; i++)
-            {
+            
+            for i in 0 ..< words.count {
                 string = string.stringByAppendingString(suggestionWords[i]) + " "
             }
             text = string

     Set content of the suggestion label.
     - parameter text: Suggestion text
     */
    private func setLabelContent(var text : String = "")
    {
        // label string
        if(text.characters.count < 1) {
            label.attributedText = nil

                suggestion.lowercaseString.hasPrefix(searchTerm.lowercaseString))
            {
                var suggestionToReturn = searchTerm
                suggestionToReturn = suggestionToReturn + suggestion.substringWithRange(suggestion.startIndex.advancedBy(searchTerm.characters.count) ..< suggestion.endIndex)
                
                returnString = suggestionToReturn
                break
