A simple example of "observer" pattern.