add common.c, ptest.c and more for the basis