modify hook function