added code for sentiment analysis