modify ProducerConsumerPattern