At the end of execution, `wordCount` represents the number of words in which the number of distinct consonants is greater than or equal to 3. The pseudocode may have mistakes. Identify all mistakes, if any.
```
wordCount = 0
while (Table 1 has more rows) {
Read the first row X in Table 1
if (doSomething(X) >= 3) {
wordCount = wordCount + 1
}
Move X to Table 2
}
Procedure doSomething(Y)
A = [], i = 1
while (i < Y.LetterCount) {
l = ith letter of Y.Word
if (l is consonant) {
A[l] = True
}
i = i + 1
}
return(length(keys(A)))
End doSomething
```