diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -19,14 +19,14 @@
             # counting frequencies of word i in dictionary d
             for j in i:
                 if d.get(j):
-                    d[j] += 2
+                    d[j] += 1
                 else:
                     d[j] = 1
 
             duplicates = 1
             for j in d.values():
                 duplicates *= math.factorial(j)
-            curr = math.factorial(len(i) + 1) // duplicates
+            curr = math.factorial(len(i)) // duplicates
 
             ans *= curr
             ans = ans % mod
