added cubic line search and wolfe conditions