detect for loop added
for detection added