test for p-cmd method