add observer pattern example