improved the worker selection logic

docs