changed Matrix::update() [matrix.cpp]