added custom minimization routines