refactored consumer threads