passing vec_AI
changing quitting criteria in local problem to get a better convergence
fixing the line search algorithm