changed reference to response instead of request at various points