modifiying resolve_redirects