loop testing in driver.c