create function sms