modifying the update hook