add priority queue version