Different for loop logic