add in some code to allow for pca whitening