built the abstraction of line search methods and linear solver