updated to the working version of the script; keep latest copy added