change the way the redirect works