finished the script corrections