added new function line search