bring over all of exec_test, make a bit more progress on loops