added test captures for loop