added pca, apply_pca and generate data