added basic observer pattern