update logic for relative links