allmost done with producer-consumer