Adding observer pattern.