SMS: The CG-BFGS method for unconstrained optimization problems