refactor settings