refactoring and change settings