update to use nextUrl