the old script, for the record
commented out debug prints
updated the script