moved redirect to the response class