added BuildMatrix to RebuildETD.R