rules, alerts, and flags now work