add some redirection code