refactoring producer