add observer pattern