setting stage for redirects