change state when getting notification