conjugate gradient method fixes done