using hash table to implement spellcheck