red flag detection