added sms function for entities