add next/prev patterns