build and save X in blocks of 1000. added a test to regressionTrain