Added code to choose the principal components to keep in pca