implemented pcca for P