add PreferenceManager class, finish!