not working observer pattern