change get `p_id` method