finds loops in video