updated Preferences with pref.flush();