put these prefs in the main function