basic implementation of spellchecker method