updated code related to sms template functionality