optimization the alert and unnormal judge logic