Indeed, that must be some code remained there from testing/previous implementation. alphabetSize is never used: removing it is the solution. Thank you.