Using a hook instead of a list of functions.