Adding observer pattern