small initial test and bug fixes of pca prim