check if change state run an event