add update hook.