consumer refactored