new alert logic