unset_pks function