change api a bit, add suppport for batch queues