added more to check_spelling algorithm