alert only on state change