fixing update matrix and initial conditions