revisions to run-functions