add observer pattern example,