wrote pca and tangent_projection