mergeQueues() finally working