chanaged the script to ensure there aren't any errors when running