Added a hook

Added a hook and tested unit changing document-wide.