handling multiple redirection