replace the 4D matrix by 2D matrix
trivial changes