priority queue in reducer integrated