modification of matrix