worker refactored