improved observer pattern