added pfunc