add prefs support