migrate prefs to script