sms function update