add blocking queue and some tests