refactor configure_url