Adding p functions