working PCA code uploaded