improve prev/next linking