resolving join to work with priority queue