adjusting the matrix values