add a test for loop