works with BlockingQueue