completed observer pattern testing and implementation