modify observer pattern