object oriented class for brent method