finished prev/next paths implementation