write pca stub and pseudocode