Newer version of the script