reworked finding of related and unrelated words into its own class