SEQUENCE DETECTOR