checking if word exists before re-saving, and changed some of the var names in the sms_controller