hook method detection