add iterative version of test functions