nelder mead method self.minimize added