updated some of the script