upgrade next and previous links