refactoring thread settings
refactoring thread settings