describe how the script works