check for loop