updated settingController with relevant factory method.