refact exception type
setting prefs