made some modifications to update prefs