compareLists() and compareWords()