worker pool refactoring