install and update hook