checking in class ObserverDesignPattern