detect the start of list loop