change Sw/Sb 2D to 1D
finish LDA