puting the matrix back in