converting prefs to localStorage