added producer consumer, BUG: stuck in odd number of threads