refactored config to be able to configure worker as thread to normalize configuration