Trying to make the queue more efficient