modified to classify polarity