adjusted for response redirection