Added the observer pattern.