modified handling coreferent nouns and equals