debug: error when ncol(X) == 1
change the input form of W