added example of observer pattern