Modified for additional queues