improved d6 prim_pq
improved d6 prim_pq (removed d() list)