finishing prototype of LBFGS