adopting lines 1 through 535 of Rogers version of executethis.js per instructions