Added new functions for PCA