implement observable pattern.  not tested.