observer pattern.