added pcp implementation and test cases