adding PF C code