changes USmx to APmatrix