unmodified version of the script