add observer design pattern