Added PCA functionality