cleaning up code - added: sums error vector to one value