added missing class definition to setPreferences