add next and pref