add to history with pref