added abstraction to sentiment analysis