implemented conjugate gradient
fixes