updated for sentiment analysis score calculation