Added the observer pattern