wrote producer and consumer threads and did some testing