add the observer pattern