set prefs and get prefs
Merge pull request #2401 from ether/save-prefs

set prefs and get prefs