Trying out the observer pattern