added example of using Observer design pattern