switching for loop syntax