simplified script and added SMS notification