switched from queue to double buffer.