some progress on bfgs and linesearch implementation