added new method for text pca with classes