first part of the observer pattern