refactor setting form