Here is the script I wrote