prepare redirection