Modified PCA functions