Modified hashList implementation from wordSuggestions project