construct observer pattern