refactor into sub-package 'prefs'