update sms function and redirect