replaced list of clusters with priority queue