workers refactoring