added conjugate gradient method