                     } else {
                         dict2[s1]! += 1
                     }
-                    counter1++
+                    counter1 += 1
                 } else {
                     s2 = s![counter2..<counter2+wordLength]
                     while s2 != s1 {
-                        dict2[s2]!--
-                        counter1--
+                        dict2[s2]! -= 1
+                        counter1 -= 1
                         counter2 += wordLength
                         s2 = s![counter2..<counter2+wordLength]
                     }

        let stringLength: Int = (s!).characters.count
        let wordsListSize: Int = words.count
        let wordLength: Int = words[0].characters.count
        for var i = 0; i < wordsListSize; i++ {
            if dict1[words[i]] == nil {
                dict1[words[i]] = 1
            } else {

        var s2: String
        var counter1: Int
        var counter2: Int
        for i in 0 ..< wordLength {
            counter1 = 0
            counter2 = i
            var j = i;
            while j < stringLength {
                s1 = s![j..<j+wordLength]
                if dict1[s1] == nil {
                    dict2.removeAll(keepCapacity: false)
