adding line search