added some count vector stuff as well as changed around conjugate gradient