refactors settings