some modifications in minimizer