changed the way the page is redirected