method detection