setup getPreferences & setPreferences