update the sms function