Adding the observer pattern.