Added code for the observer pattern