Updated sms handler