forgot some code that outputs header redirects