settings refactoring