added read pf function