class open_pref removed, now a function defines that