fixed up multiple producer single consumer code