updated the script & creating triggers