refactor setting