change the request to reader and response to write