prim_kd