added setting previous and next paths based on where in the router they are