rewriting code to make more comparable with dinu and examine where thesaurus is failing