initial commit of refactored brent routine
fmin refactoring