export the function to set the hook.