add ptest.c and ptest.h