modify matrix3d