myriad updates to this script