Modified to match updated whitening/PCA interface