update setting code