added code for parsing sms