version two of the script