use threadsafe queues