Redirect function change