added reduceDim to pca