Working on observer design pattern