matrix method update