updated trigger detection