made prefs dialog box work