Revert "small initial test and bug fixes of pca prim"

This reverts commit 6869a949500e70de3aadf1d33a13dc673116e311.