adding update hook