most matrix operations moved to update step.