Rewriting the queue