added test for for loop