for loop and conditional