added a case for for loop