move prev/next to a shared