Working notifyStateChange