finished implementation of spellcheck method