Inserted the observer pattern