add Preferences class