added portion of the line search