put the test code in two for loops